CUBE CONNECT Edition Help

FAQ - Highway

What does V1_1 represent in a loaded network?

V1_1 is the first volume set for assignment run 1. V_1 is the combined volume for all volume sets for assignment run 1; it is generally the sum of all the volume sets (V1_1, V2_1, V3_1 etc.), but the user can specify which volumes are to be combined in Highway (with FUNCTION V=). There is more than one volume set when we do multi-class assignment (LOV, HOV etc.), or assign a selected link matrix in a separate volume set. If we use a loaded network as input to Highway again and perform another assignment, the volume, speed etc. will be appended to the network file as V1_2, V_2 etc.

How do I set global turn penalties using direction codes?

The following script will take a network with direction codes and generate a turn penalty file with penalty records for all movements involving direction-coded links. One needs to set the maximum direction code which will be included in the penalty file and provide a direction-coded network. The resulting penalty file is saved in “test.pen”. One will then enter appropriate values for the penalty functions at the beginning of the file.

This script will go through the whole network and write out a file of turn penalty records for all movements that have direction codes in both links with a set number of 1. A function name makes up the from- and to- direction code (Ffftt). For example, the function name for movements from dir. code 2 to 1 is F0201.

The script also writes out the list of functions at the beginning of penalty file so the user can set the penalty for each from-to direction combination.

This script works with direction codes up to 99; otherwise. it will need to be modified.

maxcode=99 ; set maximum direction code to be included in penalty file
inputnet='dircode.net' ; input network

; Create a temporary network with only links that have a valid direction
; code. Assume dircode is an attribute in the link database and contains
; direction codes from 1 to maxcode

run pgm=network
neti=@inputnet@
neto=temp.net
if (dircode <= 0 || dircode > @maxcode@) delete
endrun

run pgm=hwyload
neti=temp.net
array FuncUsed=@maxcode@@maxcode@; dimension the array to cover all from-
                                 ; to direction code(@maxcode@x@maxcode@)

phase=linkread

; save dircode from the input file in a link work array
lw.dcode=li.dircode

phase=iloop

if (i=1) ; only do it for zone 1
loop c1=1,numlinks ; loop through all the links (from link)
if (b[c1] > Zones) ; if bnode is not a zone
loop c2=1,numlinks ; loop through all the links again for the to link
; if to-link connected to from-link, and not the reverse of from-link
if ((b[c1] = a[c2]) && (a[c1] != b[c2]))
; compute the combine code, flag the function as being used, and print out ; the penalty record
N=lw.dcode[c1]*100+lw.dcode[c2]
FuncUsed[N]=1
print form=6.0,file=penalty.pen,list=a[c1],b[c1],b[c2],' 1 F',(N+10000)(4.0T)
endif

endloop
endif
endloop

print form=6.0,file=penalty.pen,list='\n' ; write a after the last line
; now write the list of functions used
loop N=1,@maxcode@@maxcode@
if (FuncUsed[N] = 1)
print form=6.0,file=function.pen,list='F',(N+10000)(4.0T),'=0'
endloop
print form=6.0,file=function.pen,list='\n' ; write a after the last line
endif
endrun

; Use the copy command to combine the function and penalty records into ; one file. If penalty functions are already defined in a file, that file ; can be combined with the generated penalty records to make a complete ; penalty file for loading.

*copy function.pen+penalty.pen test.pen

Can Highway summarize calculated ratios such as summing volume/count ratios by lanes, speed class, or rmse by volume group?

Highway can do the summaries by coding in a LOOP (see LOOP … ENDLOOP) to go through all the links and accumulated values on them, but you have to make sure you do it in the last iteration. With equilibrium assignment, it is not easy to identify the last iteration since it may reach equilibrium before MAXITERS is reached.

An easier way is to do it in Network after the Highway step. You can accumulate any type of values (volumes, counts by lane and only if there are counts etc.) in the LINKMERGE phase in temporary variables ( _name ). You must use temporary variables; anything else will be treated as a link variable and zeroed out for each link, and will also be written out if there is an output network. You can then compute ratios etc. and report them in the SUMMARY phase.